<script type="text/javascript">
    layui.use(['layer', 'form','jquery'], function(){
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;

        $('#close').click(function () {
            close();
        });

        function close(reload){
            if(typeof(reload) !== 'undefined') {
                window.parent.location.reload();
            }
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        }
        @component('admin.ajax',['call'=>'close(true)'])
        @endcomponent
    });
</script>